import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';

export const columns: BasicColumn[] = [
    {
    title: '租户ID',
    dataIndex: 'tenantId'
   },
   {
    title: '模块组件类型',
    dataIndex: 'modelType'
   },
   {
    title: '模块组件名称',
    dataIndex: 'modelName'
   },
   {
    title: '模块展示图片',
    dataIndex: 'modelPic'
   },
   {
    title: '排序',
    dataIndex: 'sortOrder'
   },
   {
    title: '是否启用',
    dataIndex: 'isEnabled'
   },
];

export const searchFormSchema: FormSchema[] = [
 {
    label: '租户ID',
    field: 'tenantId',
    component: 'InputNumber'
  },
 {
    label: '模块组件类型',
    field: 'modelType',
    component: 'Input'
  },
];

export const formSchema: FormSchema[] = [
  // TODO 主键隐藏字段，目前写死为ID
  {label: '', field: 'id', component: 'Input', show: false},
  {
    label: '租户ID',
    field: 'tenantId',
    component: 'InputNumber',
  },
  {
    label: '模块组件类型',
    field: 'modelType',
    component: 'Input',
  },
  {
    label: '模块组件名称',
    field: 'modelName',
    component: 'Input',
  },
  {
    label: '模块展示图片',
    field: 'modelPic',
    component: 'Input',
  },
  {
    label: '排序',
    field: 'sortOrder',
    component: 'InputNumber',
  },
  {
    label: '是否启用',
    field: 'isEnabled',
    component: 'InputNumber',
  },
];
